<template>
    <div class="container">
        <div class="buttonContent">
            <div class="buttonItem" @click="goJobWanted">
                <span>求</span>
                <button>职登记</button>
            </div>
            <div class="buttonItem" @click="goPostRelease">
                <span>招</span>
                <button>聘岗位发布</button>
            </div>
        </div>
    </div>
</template>

<script>
import axios from "@/api/axios.js";
import qs, { stringify } from "qs";
export default {
    methods: {
        goJobWanted() {
            axios
                .get(
                    `/hkrc/person/getPersonInfoById?infoId=${this.$store.state.uuid}`
                )
                .then((res) => {
                    console.log(res.data);

                    if (res.data.success) {
                        if (res.data.personInfo) {
                            let data = JSON.stringify(res.data.personInfo);
                            this.$router.push({
                                name: "InfoEdit",
                                params: { data: data, type: "修改" },
                            });
                        } else {
                            this.$router.push({
                                name: "InfoEdit",
                                params: { type: "新增" },
                            });
                        }
                    }
                });
        },
        goPostRelease() {
            this.$router.push("/companycertification");
        },
    },
};
</script>

<style lang="less" scoped>
.container {
    margin-top: 25px;
    margin-bottom: 12.5px;
    padding: 0 27px;
    .buttonContent {
        display: flex;
        align-items: center;
        justify-content: space-between;
        .buttonItem {
            width: 150px;
            padding: 10px 0;
            position: relative;
            text-align: center;
            background: #0ca4e0;
            box-shadow: 0px 1px 4px 1px #ccc;
            &:last-child {
                background: #2c85f3;
                span {
                    background: #2c85f3;
                }
            }
            button {
                font-size: 18px;
                font-weight: bold;
                color: #ffffff;
            }
            span {
                position: absolute;
                top: -15px;
                left: -15px;
                width: 45px;
                height: 45px;
                font-size: 24px;
                line-height: 45px;
                text-align: center;
                font-weight: bold;
                color: #ffffff;
                background: #00b0f0;
                // border: 2px solid #1189b5;
                border-radius: 50%;
            }
        }
    }
}
</style>